package com.medical.manage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.medical.common.core.domain.Result;
import com.medical.common.security.utils.SecurityUtils;
import com.medical.manage.domain.Doctor;
import com.medical.manage.mapper.DoctorMapper;
import com.medical.manage.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
 * @BelongsProject: medical
 * @BelongsPackage: com.medical.manage.service.impl
 * @Author: szw
 * @CreateTime: 2025-03-19  11:26
 * @Description: TODO
 * @Version: 1.0
 */

@Service
public class DoctorServiceImpl extends ServiceImpl<DoctorMapper, Doctor> implements DoctorService {
    @Autowired
    private DoctorMapper doctorMapper;
    /**
     * 设置问诊价格
     * @param consultationFees
     * @return
     */
    @Override
    public Result settingPrice(BigDecimal consultationFees) {
        Long userId = SecurityUtils.getUserId();
        //设置问诊价格
        doctorMapper.settingPrice(consultationFees,userId);
        return Result.success("问诊价格设置成功");
    }
}
